<?php
/**
 * Created by PhpStorm.
 * User: yeluojun
 * Date: 14-5-7
 * Time: 下午11:40
 */
require_once "common/common.php";

function Route_handle($arg_path,$arg_req){

    $common = new common();
    try{
        $rsl = null;
        switch ($arg_path){
            case "/saveGiverMsg";$rsl = g_putMsg($arg_req);break;
            case "/getNeederMsg";$rsl = g_showNeedMsg($arg_req);break;
            case "/saveNeederMsg";$rsl = n_putMsg($arg_req);break;
            case "/getGiverMsg";$rsl = n_showGiverMsg($arg_req);break;
            case "/getGiverMsgByID";$rsl = n_showGiverMsgById($arg_req);break;
            case "/getNeederMsgByID";$rsl = g_showNeedMsgById($arg_req);break;
        }
        return $rsl;
    }catch (Exception $e){
        return $common->returnMsg(1,"系统异常",null);
    }
}